package org.lanqiao.music.web.controller;

import com.github.pagehelper.PageInfo;
import org.lanqiao.music.common.utils.PageDTO;
import org.lanqiao.music.system.entity.User;
import org.lanqiao.music.system.service.UserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (User)表控制层
 *
 * @author makejava
 * @since 2024-08-15 20:54:51
 */
@RestController
@RequestMapping("user")
public class UserController {
    /**
     * 服务对象
     */
    @Resource
    private UserService userService;

    @GetMapping("/getUsers")
    public PageInfo<User> getUsers() {
       return userService.queryByPage(new User(),new PageDTO());
    }

    @GetMapping("/id")
    public User getById(Integer id) {
        return userService.queryById(id);
    }


}

